-- GENERATED SPELL FOR [Scholomance Occultist] --


function spell0_10472(pUnit, Event) --@Bone Armor,n/a--
pUnit:FullCastSpellOnTarget(16431,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10472', 540, 1)
end

function spell1_10472(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10472', 15342, 1)
end

function spell2_10472(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(17228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10472', 535, 1)
end

function Sorts_10472(pUnit, Event)
local choix_sorts_10472 = math.random(0, 2)
if choix_sorts_10472 == 0 then
pUnit:RegisterEvent('spell0_10472', 1, 1)
end
if choix_sorts_10472 == 1 then
pUnit:RegisterEvent('spell1_10472', 1, 1)
end
if choix_sorts_10472 == 2 then
pUnit:RegisterEvent('spell2_10472', 1, 1)
end
end

function mob10472_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10472', math.random(1500, 3000), 1)
end

function mob10472_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10472_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10472_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10472, 1, 'mob10472_Action')
RegisterUnitEvent(10472, 2, 'mob10472_Leave')
RegisterUnitEvent(10472, 3, 'mob10472_Kill')
RegisterUnitEvent(10472, 4, 'mob10472_Die')
